<template>
    <div>
        <grid-layout-view :localParams="paramsCustom" :layout="layoutList"></grid-layout-view>
    </div>
</template>

<script>
import GridLayoutView from "../../GridLayoutView/GridLayoutView.vue";
import FormCustomPublic from "../FormCustomPublic.js";
import BusEvent from "../BusEvent";
export default {
    name: "CustomPageView",
    props: {
        config:{
            type:Object,
            default:()=>{
                return {}
            }
        }
    },
    mixins:[FormCustomPublic,BusEvent],
    components: {
        GridLayoutView,
    },
    data(){
        return{
            layoutList:[],
            paramsCustom:{}
        }
    },
    created(){
        let params = this.getRouterParams()
        if(this.config.params){
            this.config.params.filter(item=>{
                this.paramsCustom[item.receiveParameters] = params[item.inParameter]
            })
        }
        this.layoutList =this.config.custom.json?JSON.parse(this.config.custom.json):[]
    },
    methods:{

    }
}
</script>

<style scoped>

</style>
